package com.xiaoxu.rental.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaoxu.rental.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author xtq
* @description 针对表【sys_user】的数据库操作Service
* @createDate 2024-07-26 08:40:20
*/
public interface UserService extends IService<User> {
    //从数据库中查询
    User selectByUsername(String username);
    //通过用户id查询角色名称
    List<String> selectRoleByUserId(Integer userId);
    Page<User> searchByPage(Page<User> page, User user);

    boolean delete(String ids);
    //绑定角色
    boolean bindRole(Integer userId, List<Integer> list);
}
